﻿using System;
using System.Threading;
using Microsoft.SPOT;
using MFGps;
using MFGps.Devices;
using MFGps.Data;

namespace TestHarnessNetduino
{
    public class Program
    {
        public static void Main()
        {
            Debug.EnableGCMessages(false);
            IGpsDevice gps = DeviceFactory.GetGpsDevice(GpsDeviceType.MediaTek, "COM1", 57600); // I am using a locosys so that's what's here - GregO
            gps.Connect();
            gps.PositionChanged += gps_PositionChanged;

            Thread.Sleep(Timeout.Infinite);
        }

        static void gps_PositionChanged(DegreeTime Latitude, DegreeTime Longitude, DateTime LocalTime)
        {
            Debug.Print("Location : " + Latitude.ToString() + " " + Longitude.ToString() + " LocalTime : " + LocalTime.ToString());
        }

    }
}
